home *** CD-ROM | disk | FTP | other *** search
- #include "VCRplus.h"
-
- extern vcrInfo myVCR;
-
- void decoder(void)
- {
- long s1_out, bot3, top5, quo, rem ;
- long s5_out, mtout, ofout, tval, cval ;
- long day_out;
-
- Str32 tempStr;
-
-
- ofout = INVALID ;
- mtout = INVALID ;
-
- s1_out = f1(myVCR.code);
- bot3 = s1_out % 1000;
- top5 = s1_out / 1000;
- quo = (bot3 - 1) / 32 ;
- rem = (bot3 - 1) % 32 ;
- day_out = quo + 1;
-
- if(myVCR.code >= 1000)
- offset(day_out, myVCR.year, top5, (&ofout), (&mtout)) ;
- else
- {
- mtout = 0;
- ofout = 0;
- }
-
- s5_out = (rem + (day_out*(myVCR.month+1)) + ofout) % 32 ;
-
-
- bit_shuffle(mtout, s5_out, &tval, &cval);
- myVCR.channel = cval + 1;
- lookup(tval, (&myVCR.startTime), (&myVCR.duration));
-
- myVCR.day = day_out;
- NumToString(myVCR.day, tempStr);
- SetDText(dlgDAY, tempStr);
-
- NumToString(myVCR.channel, tempStr);
- SetDText(dlgCHANNEL, tempStr);
-
- NumToString(myVCR.startTime, tempStr);
- SetDText(dlgSTARTTIME, tempStr);
-
- NumToString(myVCR.duration, tempStr);
- SetDText(dlgDURATION, tempStr);
- }
-